﻿--[[
   @brief    run-game popup window
   @author   rudolfzhang
   @version  1.0
   @date     2015-03-27
--]]

base_utility.log("loading popup_wnd desc.lua");

popup_wnd_desc = {
    module_name = 'popup_wnd',
    events = {
        {
            c_event = {
                {
                 
                },
                {
                    id  = ierd_tgp.tips_mgr.SHOW_LOGIN_TIPS,
                    callback = "popup_wnd_control.on_show_login_tips"
                },
                {
                    id  = ierd_tgp.login_mgr.QM_MATRIX_SHOW_LOAD_FAIL,
                    callback = "popup_wnd_model.show_load_matrix_fail_tips"
                },
                {
                    id = ierd_tgp.tips_mgr.ON_MSGTIPS_GAME_RUNNING,
                    callback = "popup_wnd_control.get_game_runing_state"
                },
                {
                    id = ierd_tgp.game_mgr.GAME_MGR_GAME_END,
                    callback = "popup_wnd_control.game_ended_show_login_tips"
                },
                {
                    id = ierd_tgp.game_mgr.GAME_MGR_PROCESS_DELETED,
                    callback = "popup_wnd_control.game_ended_show_login_tips"
                }
            },
            lua_event = {
                {
                    id = popup_wnd_event.REPAIR_GAME_GUIDE,
                    callback = 'popup_wnd_model.set_repair_guide_wnd'
                },
                {
                    id = popup_wnd_event.FAILED_TO_START,
                    callback = 'popup_wnd_model.set_failed_to_start_wnd'
                },
                {
                    id = popup_wnd_event.IDENTITY_VERIFICATION,
                    callback = 'popup_wnd_model.set_identity_verification_wnd'
                },
                {
                    id = popup_wnd_event.EXIT_GAME,
                    callback = 'popup_wnd_model.set_exit_game_wnd'
                },
                {
                    id = popup_wnd_event.PRE_UPDATE_GAME,
                    callback = 'popup_wnd_model.set_preupdate_game_wnd'
                },
                {
                    id  = mainframe_event.MAINFRAME_WND_SHOWN,
                    callback = "popup_wnd_control.on_main_wnd_show"
                },
                {
                    id  = extendboard_event.EXTENDBOARD_CREATED,
                    callback = "popup_wnd_control.on_extendboard_created"
                },
                {
                    id  = landingpage_event.LANDINGPAGE_CREATED,
                    callback = "popup_wnd_control.on_landingpage_created"
                },
                {
                    id = popup_wnd_event.SHOW_LOW_SPEED_TIP,
                    callback = 'popup_wnd_control.show_low_speed_tip'
                },
                {
                    id = popup_wnd_event.SHOW_NETBAR_ORDER_TIPS,
                    callback = 'popup_wnd_model.show_netbar_order_tips'
                },
                {
                    id = popup_wnd_event.SHOW_WEGAME_QUALIFY_LOGIN_TIPS,
                    callback = 'popup_wnd_model.show_wegame_qualify_login_tips'
                },
                {
                    id = popup_wnd_event.SHOW_TOOLBOX_WARNING_TIPS,
                    callback = 'popup_wnd_model.show_toolbox_warning_tips'
                },
                {
                    id = popup_wnd_event.SHOW_CLOUD_GAME_ALREADY_RUNNING_TIPS,
                    callback = 'popup_wnd_model.set_cloud_game_running_wnd'
                }   
            },
            listen_broadcast =
            {
                {
                    id = "Msg_CommonTips",
                    callback = "popup_wnd_model.common_tips"
                },
                {
                    id = "Msg_GameKickOffTips",
                    callback = "popup_wnd_model.game_kickoff_tips"
                },
            },
            lua_file = 'popup_wnd\\control.lua'
        }
    }
};

desc_mgr.add(popup_wnd_desc);
--popup_wnd_control.init();